﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:WindowsPhone7ActionPack_Behaviors="clr-namespace:WindowsPhone7ActionPack.Behaviors;assembly=WindowsPhone7ActionPack.Behaviors"
	mc:Ignorable="d"
	x:Class="WindowsPhone7ActionPack.Sandbox.UserControl1"
	d:DesignWidth="640" d:DesignHeight="480">

	<Grid x:Name="LayoutRoot">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.2"/>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Right">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="textBlock">
							<DiscreteObjectKeyFrame KeyTime="0" Value="Right"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Left">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="textBlock">
							<DiscreteObjectKeyFrame KeyTime="0" Value="Left"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Port">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="textBlock">
							<DiscreteObjectKeyFrame KeyTime="0" Value="Port"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<i:Interaction.Behaviors>
			<WindowsPhone7ActionPack_Behaviors:OrentationChangedGoToStateBehavior
				PortraitStateName="Port" LandscapeLeftStateName="Left" LandscapeRightStateName="Right" UseTransitions="True">
				<i:Interaction.Triggers>
					<i:EventTrigger SourceName="LayoutRoot" EventName="MouseLeftButtonDown">
						<i:InvokeCommandAction CommandName="MyCommand"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
			</WindowsPhone7ActionPack_Behaviors:OrentationChangedGoToStateBehavior>
		</i:Interaction.Behaviors>
		<TextBlock x:Name="textBlock" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Normal" VerticalAlignment="Top" FontSize="24" Margin="4"/>
	</Grid>
</UserControl>